<template>
    <div>
        <h2>一、项目简介（限200字）</h2>
        <a-textarea class="section" show-count :maxlength="200" :rows="4" :autosize="false" v-model:value="intro" />
    </div>
    <div>
        <h2>二、立项依据</h2>
        <ueditor class="section" v-model="basis" style="width: 100%" :height="600" :config="{ autoHeightEnabled: false, }" />
    </div>
</template>

<script setup>
import { ref, inject } from 'vue'

const data = inject("data");

const props = defineProps({
    defaultBasis: {
        type: String,
        defaultValue: ""
    }
});

const intro = ref("");
const basis = ref("");

function reset () {    
    intro.value = data.extInfo.ProjectIntro;
    basis.value = data.extInfo.ProjectBasis || props.defaultBasis;
}

reset();

defineExpose({
    intro,
    basis,
    reset,
});

</script>